home *** CD-ROM | disk | FTP | other *** search
- ## logfile_test.tg
- # demonstrate the log file facility.
- # Special thanks to a wincron user for sending in this interesting use of the
- # DATE MACROS for create a logfile name with meaning!
- # See Also: macro_test.tg & DATE MACROS in the documentation.
-
- # logfile test
- {
- -name logfile_main
- -start
- -stop
-
- # first we create a logfile with a simple name
- -action -logfile "%TG.ROOT_DIR%My Logfile.txt"
-
- # okay, send some text to the log
- -action -print All this is going to the logfile!
- -action -print find the results here: "%TG.ROOT_DIR%My Logfile.txt"
-
- # now for a log file that encodes the date/time in the name
- # The format of the file name is:
- # %m% Month as decimal number (01-12)
- # %d% Day of month as decimal number (01-31)
- # %H% Hour in 24-hour format (00-23)
- # %M% Minute as decimal number (00-59)
- -action -logfile "%TG.ROOT_DIR%%m%%d%%H%%M%.txt"
-
- # okay, send some text to the log
- -action -print All this is going to the logfile too!
- -action -print find the results here: "%TG.ROOT_DIR%%m%%d%%H%%M%.txt"
- }
-
-
-